<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../lib/jquery/jquery-1.11.1.js" ></script>
		<script type="text/javascript">
			function f1(){
				console.log($('#username').attr('type'));
				console.log($('#username').attr('class'));
				console.log($('#username').attr('id'));
				console.log($('#username').attr('name'));
				console.log($('#username').attr('value'));
				console.log($('#username').attr('address'));
			}
			function f2() {
				$('#username').attr('class','orange');
				$('#username').attr();
			}
		</script>
	</head>
	<body>
		<h1>属性操作</h1>
        <input type="text"  class="apple"  id="username"  name="username" value="tom" address="beijing" />
        
        <input type="button" value="获取" onclick="f1()" />
        <input type="button" value="设置" onclick="f2()" />
        <input type="button" value="批量修改" onclick="f3()" />
        <input type="button" value="函数修改" onclick="f4()" />
        <input type="button" value="删除属性" onclick="f5()" />
	</body>
</html>
